//package com.geostar.tbsdemo;
//
//import android.content.Context;
//import android.os.Bundle;
//import android.util.Log;
//
//import com.tencent.smtt.sdk.an;
//import com.tencent.smtt.sdk.az;
//import com.tencent.smtt.sdk.p;
//
///**
// * @author hanlyjiang on 2017/11/22-22:15.
// * @version 1.0
// */
//
////
//// Source code recreated from context .class file by IntelliJ IDEA
//// (powered by Fernflower decompiler)
////
//
//
//
//import android.app.Activity;
//import android.graphics.drawable.Drawable;
//import android.widget.FrameLayout;
//
//import com.tencent.smtt.sdk.q;
//import com.tencent.smtt.utils.Apn;
//
//public class TbsReaderView extends FrameLayout {
//    public static final String IS_BAR_ANIMATING = "is_bar_animating";
//    public static final String IS_BAR_SHOWING = "is_bar_show";
//    public static final String IS_INTO_DOWNLOADING = "into_downloading";
//    public static final String KEY_FILE_PATH = "filePath";
//    public static final String KEY_TEMP_PATH = "tempPath";
//    public static String gReaderPackName = "";
//    public static String gReaderPackVersion = "";
//    public static final String TAG = "TbsReaderView";
//    Context context = null;
//    p b = null;
//    Object c = null;
//    com.tencent.smtt.sdk.TbsReaderView.ReaderCallback d = null;
//    com.tencent.smtt.sdk.TbsReaderView.ReaderCallback e = null;
//    public static final String READER_STATISTICS_COUNT_CLICK_LOADED_BTN = "AHNG801";
//    public static final String READER_STATISTICS_COUNT_CANCEL_LOADED_BTN = "AHNG802";
//    public static final String READER_STATISTICS_COUNT_RETRY_BTN = "AHNG803";
//    public static final String READER_STATISTICS_COUNT_PPT_PLAY_BTN = "AHNG806";
//    public static final String READER_STATISTICS_COUNT_PPT_INTO_DIALOG = "AHNG807";
//    public static final String READER_STATISTICS_COUNT_PPT_INTO_DOWNLOAD = "AHNG808";
//    public static final String READER_STATISTICS_COUNT_PPT_INTO_BROWSER = "AHNG809";
//    public static final String READER_STATISTICS_COUNT_PDF_FOLDER_BTN = "AHNG810";
//    public static final String READER_STATISTICS_COUNT_PDF_INTO_DIALOG = "AHNG811";
//    public static final String READER_STATISTICS_COUNT_PDF_INTO_DOWNLOAD = "AHNG812";
//    public static final String READER_STATISTICS_COUNT_PDF_INTO_BROWSER = "AHNG813";
//    public static final String READER_STATISTICS_COUNT_TXT_NOVEL_BTN = "AHNG814";
//    public static final String READER_STATISTICS_COUNT_TXT_INTO_DIALOG = "AHNG815";
//    public static final String READER_STATISTICS_COUNT_TXT_INTO_DOWNLOAD = "AHNG816";
//    public static final String READER_STATISTICS_COUNT_TXT_INTO_BROWSER = "AHNG817";
//    public static final String READER_STATISTICS_COUNT_DOC_SEARCH_BTN = "AHNG826";
//    public static final String READER_STATISTICS_COUNT_DOC_INTO_DIALOG = "AHNG827";
//    public static final String READER_STATISTICS_COUNT_DOC_INTO_DOWNLOAD = "AHNG828";
//    public static final String READER_STATISTICS_COUNT_DOC_INTO_BROWSER = "AHNG829";
//    public static final int READER_CHANNEL_PPT_ID = 10833;
//    public static final int READER_CHANNEL_PDF_ID = 10834;
//    public static final int READER_CHANNEL_TXT_ID = 10835;
//    public static final int READER_CHANNEL_DOC_ID = 10965;
//    static boolean f = false;
//
//    public TbsReaderView(Context var1, com.tencent.smtt.sdk.TbsReaderView.ReaderCallback var2) {
//        super(var1.getApplicationContext());
//        if(!(var1 instanceof Activity)) {
//            throw new RuntimeException("error: unexpect context(none Activity)");
//        } else {
//            this.d = var2;
//            this.context = var1;
//            this.e = new az(this);
//        }
//    }
//
//    static boolean a(Context var0) {
//        if(!f) {
//            q.a(true).a(var0.getApplicationContext(), true, false, (an)null);
//            f = q.a(false).b();
//        }
//
//        return f;
//    }
//
//    public static boolean isSupportExt(Context var0, String var1) {
//        boolean var2 = false;
//        boolean var3 = a(var0);
//        if(var3) {
//            var2 = p.a(var0) && p.a(var1);
//        }
//
//        return var2;
//    }
//
//    public boolean preOpen(String var1, boolean var2) {
//        boolean var3 = isSupportExt(this.context, var1);
//        if(!var3) {
//            Log.e("TbsReaderView", "not supported by:" + var1);
//            return false;
//        } else {
//            boolean var4 = false;
//            var4 = a(this.context);
//            if(var4) {
//                var4 = this.a();
//                if(var2 && var4) {
//                    boolean var5 = Apn.getApnType(this.context) == 3;
//                    var4 = this.b.a(this.c, this.context, var1, var5);
//                }
//            }
//
//            return var4;
//        }
//    }
//
//    public boolean downloadPlugin(String var1) {
//        if(this.c == null) {
//            Log.e("TbsReaderView", "downloadPlugin failed!");
//            return false;
//        } else {
//            return this.b.a(this.c, this.context, var1, true);
//        }
//    }
//
//    public static Drawable getResDrawable(Context var0, int var1) {
//        Drawable var2 = null;
//        if(a(var0)) {
//            var2 = p.a(var1);
//        }
//
//        return var2;
//    }
//
//    public static String getResString(Context var0, int var1) {
//        String var2 = "";
//        if(a(var0)) {
//            var2 = p.b(var1);
//        }
//
//        return var2;
//    }
//
//    public void openFile(Bundle bundle) {
//        boolean var2 = false;
//        if(this.c != null && bundle != null) {
//            //
//            // ReaderCallback
//            boolean var3 = d.c(this.context);
//            var3 |= !d.b(this.context);
//            bundle.putBoolean("browser6.0", var3);
//            long var4 = 6101625L;
//            long var6 = 610000L;
//            boolean var8 = d.a(this.context, var4, var6);
//            var8 |= !d.b(this.context);
//            bundle.putBoolean("browser6.1", var8);
//            // 通过dexloader 加载 TbsReader 的 openFile
//            var2 = this.b.a(this.c, this.context, bundle, this);
//            if(!var2) {
//                Log.e("TbsReaderView", "OpenFile failed!");
//            }
//        } else {
//            Log.e("TbsReaderView", "init failed!");
//        }
//    }
//
//    public void doCommand(Integer var1, Object var2, Object var3) {
//        if(this.b != null && this.c != null) {
//            this.b.a(this.c, var1, var2, var3);
//        }
//
//    }
//
//    public void onSizeChanged(int var1, int var2) {
//        if(null != this.b && null != this.c) {
//            this.b.a(this.c, var1, var2);
//        }
//
//    }
//
//    public void onStop() {
//        if(this.b != null) {
//            this.b.a(this.c);
//            this.c = null;
//        }
//
//        this.context = null;
//        f = false;
//    }
//
//    public void userStatistics(String var1) {
//        if(this.b != null) {
//            this.b.a(this.c, var1);
//        }
//
//    }
//
//    boolean a() {
//        boolean var1 = false;
//
//        try {
//            if(this.b == null) {
//                this.b = new p(this.e);
//            }
//
//            if(null == this.c) {
//                this.c = this.b.a();
//            }
//
//            if(this.c != null) {
//                var1 = this.b.a(this.c, this.context);
//            }
//        } catch (NullPointerException var3) {
//            Log.e("TbsReaderView", "Unexpect null object!");
//            var1 = false;
//        }
//
//        return var1;
//    }
//
//    public interface ReaderCallback {
//        int NOTIFY_CANDISPLAY = 12;
//        int NOTIFY_ERRORCODE = 19;
//        int GET_BAR_ANIMATING = 5000;
//        int HIDDEN_BAR = 5001;
//        int SHOW_BAR = 5002;
//        int COPY_SELECT_TEXT = 5003;
//        int SEARCH_SELECT_TEXT = 5004;
//        int READER_TOAST = 5005;
//        int SHOW_DIALOG = 5006;
//        int READER_PDF_LIST = 5008;
//        int READER_PPT_PLAY_MODEL = 5009;
//        int READER_TXT_READING_MODEL = 5010;
//        int INSTALL_QB = 5011;
//        int READER_PLUGIN_STATUS = 5012;
//        int READER_PLUGIN_CANLOAD = 5013;
//        int READER_PLUGIN_DOWNLOADING = 5014;
//        int READER_PLUGIN_COMMAND_FIXSCREEN = 5015;
//        int READER_PLUGIN_RES_FIXSCREEN_NORMAL = 5016;
//        int READER_PLUGIN_RES_FIXSCREEN_PRESS = 5017;
//        int READER_PLUGIN_COMMAND_ROTATESCREEN = 5018;
//        int READER_PLUGIN_RES_ROTATESCREEN_NORMAL = 5019;
//        int READER_PLUGIN_RES_ROTATESCREEN_PRESS = 5020;
//        int READER_PLUGIN_RES_PPT_GUIDE = 5021;
//        int READER_PLUGIN_RES_TXT_GUIDE = 5022;
//        int READER_PLUGIN_RES_PDF_GUIDE = 5023;
//        int GET_BAR_ISSHOWING = 5024;
//        int READER_PLUGIN_SO_ERR = 5025;
//        int READER_SEARCH_IN_DOCUMENT = 5026;
//        int READER_PLUGIN_SO_INTO_START = 5027;
//        int READER_PLUGIN_SO_PROGRESS = 5028;
//        int READER_PLUGIN_RES_DOC_GUIDE = 5029;
//        int READER_PLUGIN_SO_VERSION = 5030;
//        int READER_OPEN_QQ_FILE_LIST = 5031;
//        int READER_PLUGIN_ACTIVITY_PAUSE = 5032;
//        int READER_PLUGIN_COMMAND_PPT_PLAYER = 5035;
//        int READER_PLUGIN_COMMAND_PDF_LIST = 5036;
//        int READER_PLUGIN_COMMAND_TEXT_FIND = 5038;
//        int READER_PLUGIN_COMMAND_TEXT_FIND_NEXT = 5039;
//        int READER_PLUGIN_COMMAND_TEXT_FIND_PREV = 5040;
//        int READER_PLUGIN_COMMAND_TEXT_FIND_CLEAR = 5041;
//        int READER_PLUGIN_TEXT_FIND_RESULT = 5042;
//
//        void onCallBackAction(Integer var1, Object var2, Object var3);
//    }
//}
//
